package com.cloud.code.真题;

import java.util.*;

public class Demo5 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        Map<String, Integer> map = new TreeMap<>();
        int ie = 3;
        while (ie >0) {

            String line = scanner.nextLine();
            String[] s = line.split(" ");
            map.put(s[1], map.getOrDefault(s[1], 0) + Integer.parseInt(s[2]));
            ie--;
        }

        List<Map.Entry<Integer, Integer>> list = new ArrayList(map.entrySet());

        int sum = 0;
        for (int i = list.size() - 1; i >= 0; i--) {
            sum = (list.get(i).getValue()+sum) / 100 * 15;
        }

        System.out.println(sum);
    }
}
